package com.jspxcms.plug.domain;

import javax.persistence.*;

/**
 * Created by yuanyue on 14-9-7.
 */
@Entity
@Table(name = "plug_hospital")
public class PlugHospital {
    private int id;
    private String fHospitalName;
    private String fHospitalDescription;
    private String fAddress;
    private Integer fProvinceId;
    private Integer fCityId;
    private Integer fAreaId;
    private String fTelephone;
    private String fHospitalLevel;
    private String fHospitalTese;






    /**
     * add by cuizhikui on 14-12-28.
     */
    private String fZipCode;//邮编
    private String fDean;//院长
    private String fBed;//床位
    private String fDailyVisit;//日诊量
    private String fEquipment;//设备
    private String fRoute;//路线
    private String fWebsite;//网址
    private String fEmail;//电邮



    @Basic
    @Column(name = "f_zip_code", nullable = true, insertable = true, updatable = true, length = 10)
    public String getfZipCode()
    {
        return fZipCode;
    }

    public void setfZipCode(String fZipCode)
    {
        this.fZipCode = fZipCode;
    }


    @Basic
    @Column(name = "f_dean", nullable = true, insertable = true, updatable = true, length = 50)
    public String getfDean()
    {
        return fDean;
    }

    public void setfDean(String fDean)
    {
        this.fDean = fDean;
    }

    @Basic
    @Column(name = "f_bed", nullable = true, insertable = true, updatable = true, length = 10)
    public String getfBed()
    {
        return fBed;
    }

    public void setfBed(String fBed)
    {
        this.fBed = fBed;
    }

    @Basic
    @Column(name = "f_daily_visit", nullable = true, insertable = true, updatable = true, length = 10)
    public String getfDailyVisit()
    {
        return fDailyVisit;
    }

    public void setfDailyVisit(String fDailyVisit)
    {
        this.fDailyVisit = fDailyVisit;
    }

    @Basic
    @Column(name = "f_equipment", nullable = true, insertable = true, updatable = true, length = 200)
    public String getfEquipment()
    {
        return fEquipment;
    }

    public void setfEquipment(String fEquipment)
    {
        this.fEquipment = fEquipment;
    }

    @Basic
    @Column(name = "f_route", nullable = true, insertable = true, updatable = true, length = 200)
    public String getfRoute()
    {
        return fRoute;
    }

    public void setfRoute(String fRoute)
    {
        this.fRoute = fRoute;
    }

    @Basic
    @Column(name = "f_website", nullable = true, insertable = true, updatable = true, length = 50)
    public String getfWebsite()
    {
        return fWebsite;
    }

    public void setfWebsite(String fWebsite)
    {
        this.fWebsite = fWebsite;
    }

    @Basic
    @Column(name = "f_email", nullable = true, insertable = true, updatable = true, length = 50)
    public String getfEmail()
    {
        return fEmail;
    }

    public void setfEmail(String fEmail)
    {
        this.fEmail = fEmail;
    }


    /**
     * add by cuizhikui on 14-12-28.
     */





    @Id
    @Column(name = "f_hospital_id", nullable = false, insertable = true, updatable = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "f_hospital_name", nullable = false, insertable = true, updatable = true, length = 50)
    public String getfHospitalName() {
        return fHospitalName;
    }

    public void setfHospitalName(String fHospitalName) {
        this.fHospitalName = fHospitalName;
    }

    @Basic
    @Column(name = "f_hospital_description", nullable = true, insertable = true, updatable = true, length = 2000)
    public String getfHospitalDescription() {
        return fHospitalDescription;
    }

    public void setfHospitalDescription(String fHospitalDescription) {
        this.fHospitalDescription = fHospitalDescription;
    }

    @Basic
    @Column(name = "f_address", nullable = true, insertable = true, updatable = true, length = 200)
    public String getfAddress() {
        return fAddress;
    }

    public void setfAddress(String fAddress) {
        this.fAddress = fAddress;
    }

    @Basic
    @Column(name = "f_province_id", nullable = true, insertable = true, updatable = true)
    public Integer getfProvinceId() {
        return fProvinceId;
    }

    public void setfProvinceId(Integer fProvinceId) {
        this.fProvinceId = fProvinceId;
    }

    @Basic
    @Column(name = "f_city_id", nullable = true, insertable = true, updatable = true)
    public Integer getfCityId() {
        return fCityId;
    }

    public void setfCityId(Integer fCityId) {
        this.fCityId = fCityId;
    }

    @Basic
    @Column(name = "f_area_id", nullable = true, insertable = true, updatable = true)
    public Integer getfAreaId() {
        return fAreaId;
    }

    public void setfAreaId(Integer fAreaId) {
        this.fAreaId = fAreaId;
    }

    @Basic
    @Column(name = "f_telephone", nullable = true, insertable = true, updatable = true, length = 20)
    public String getfTelephone() {
        return fTelephone;
    }

    public void setfTelephone(String fTelephone) {
        this.fTelephone = fTelephone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PlugHospital that = (PlugHospital) o;

        if (id != that.id) return false;
        if (fAddress != null ? !fAddress.equals(that.fAddress) : that.fAddress != null) return false;
        if (fAreaId != null ? !fAreaId.equals(that.fAreaId) : that.fAreaId != null) return false;
        if (fCityId != null ? !fCityId.equals(that.fCityId) : that.fCityId != null) return false;
        if (fHospitalDescription != null ? !fHospitalDescription.equals(that.fHospitalDescription) : that.fHospitalDescription != null)
            return false;
        if (fHospitalName != null ? !fHospitalName.equals(that.fHospitalName) : that.fHospitalName != null)
            return false;
        if (fProvinceId != null ? !fProvinceId.equals(that.fProvinceId) : that.fProvinceId != null) return false;
        if (fTelephone != null ? !fTelephone.equals(that.fTelephone) : that.fTelephone != null) return false;

        if (fZipCode != null ? !fZipCode.equals(that.fZipCode) : that.fZipCode != null) return false;
        if (fDean != null ? !fDean.equals(that.fDean) : that.fDean != null) return false;
        if (fBed != null ? !fBed.equals(that.fBed) : that.fBed != null) return false;
        if (fDailyVisit != null ? !fDailyVisit.equals(that.fDailyVisit) : that.fDailyVisit != null) return false;
        if (fEquipment != null ? !fEquipment.equals(that.fEquipment) : that.fEquipment != null) return false;
        if (fRoute != null ? !fRoute.equals(that.fRoute) : that.fRoute != null) return false;
        if (fWebsite != null ? !fWebsite.equals(that.fWebsite) : that.fWebsite != null) return false;
        if (fEmail != null ? !fEmail.equals(that.fEmail) : that.fEmail != null) return false;

        return true;
    }



    @Basic
    @Column(name = "f_hospital_tese", nullable = true, insertable = true, updatable = true, length = 200)
    public String getfHospitalTese() {
        return fHospitalTese;
    }

    public void setfHospitalTese(String fHospitalTese) {
        this.fHospitalTese = fHospitalTese;
    }

    @Basic
    @Column(name = "f_hospital_level", nullable = true, insertable = true, updatable = true, length = 20)
    public String getfHospitalLevel() {
        return fHospitalLevel;
    }

    public void setfHospitalLevel(String fHospitalLevel) {
        this.fHospitalLevel = fHospitalLevel;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (fHospitalName != null ? fHospitalName.hashCode() : 0);
        result = 31 * result + (fHospitalDescription != null ? fHospitalDescription.hashCode() : 0);
        result = 31 * result + (fAddress != null ? fAddress.hashCode() : 0);
        result = 31 * result + (fProvinceId != null ? fProvinceId.hashCode() : 0);
        result = 31 * result + (fCityId != null ? fCityId.hashCode() : 0);
        result = 31 * result + (fAreaId != null ? fAreaId.hashCode() : 0);
        result = 31 * result + (fHospitalLevel != null ? fHospitalLevel.hashCode() : 0);
        result = 31 * result + (fTelephone != null ? fTelephone.hashCode() : 0);
        result = 31 * result + (fZipCode != null ? fZipCode.hashCode() : 0);
        result = 31 * result + (fDean != null ? fDean.hashCode() : 0);
        result = 31 * result + (fBed != null ? fBed.hashCode() : 0);
        result = 31 * result + (fDailyVisit != null ? fDailyVisit.hashCode() : 0);
        result = 31 * result + (fEquipment != null ? fEquipment.hashCode() : 0);
        result = 31 * result + (fRoute != null ? fRoute.hashCode() : 0);
        result = 31 * result + (fWebsite != null ? fWebsite.hashCode() : 0);
        result = 31 * result + (fEmail != null ? fEmail.hashCode() : 0);

        return result;
    }
}
